<template>
    <div class="box">
        <rightTitle title="实时警报"></rightTitle>
        <div class="content">
            <dv-scroll-board :config="config" class="scr" style="width:100%;height:100%;" />
        </div>
    </div>
</template>

<script setup lang="ts">
import { reactive } from 'vue';
import rightTitle from './rightTitle.vue';
import { get } from '@/request/methods';

const config = reactive({
    header: ['', '楼层', '设备状态'],
    data: [

    ]
})
get({ url: '/v1.0/api/deviceWorking/allPoliceData' }).then(res => {
    let data = res.data.data
    // console.log(data);
    data.forEach((v: any) => {
        let val = Object.values(v)
        config.data.push(val as never)
    });

})

</script>

<style lang="scss" scoped>
.box {
    width: 75%;
    height: 45%;
    margin: 20px auto;

    .content {
        background-color: rgba(255, 255, 255, .1);
        width: 100%;
        margin-top: 10px;
        height: calc(100% - 40px);
    }
}
</style>